package com.hc.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 用户
 *
 * @author 梁云亮
 */
@ApiModel(value = "Domain:User")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "tb_user")
public class User implements Serializable {
    private static final long serialVersionUID = -7469856676598083836L;
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "主键")
    private Integer id;

    /**
     * 头相
     */
    @TableField(value = "avatar")
    @ApiModelProperty(value = "头相")
    private String avatar;

    /**
     * 昵称
     */
    @TableField(value = "nickname")
    @ApiModelProperty(value = "昵称")
    private String nickname;

    /**
     * 登录名
     */
    @TableField(value = "username")
    @ApiModelProperty(value = "登录名")
    private String username;

    /**
     * 密码
     */
    @TableField(value = "password")
    @ApiModelProperty(value = "密码")
    private String password;

    /**
     * 电话
     */
    @TableField(value = "tel")
    @ApiModelProperty(value = "电话")
    private String tel;

    /**
     * 邮箱
     */
    @TableField(value = "email")
    @ApiModelProperty(value = "邮箱")
    private String email;

    /**
     * 博客主页
     */
    @TableField(value = "homepage")
    @ApiModelProperty(value = "博客主页")
    private String homepage;

    /**
     * 个人主页
     */
    @TableField(value = "website")
    @ApiModelProperty(value = "个人主页")
    private String website;

    /**
     * 总排名
     */
    @TableField(value = "rankings1")
    @ApiModelProperty(value = "总排名")
    private Integer rankings1;

    /**
     * 周排名
     */
    @TableField(value = "rankings2")
    @ApiModelProperty(value = "周排名")
    private Integer rankings2;

    /**
     * 积分
     */
    @TableField(value = "credit")
    @ApiModelProperty(value = "积分")
    private Integer credit;

    /**
     * 简介
     */
    @TableField(value = "intro")
    @ApiModelProperty(value = "简介")
    private String intro;

    /**
     * 状态
     */
    @TableField(value = "status")
    @ApiModelProperty(value = "状态")
    private Integer status;

    /**
     * 注册时间
     */
    @TableField(value = "create_time")
    @ApiModelProperty(value = "注册时间")
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @TableField(value = "update_time")
    @ApiModelProperty(value = "修改时间")
    private LocalDateTime updateTime;

    public User(String avatar, String nickname, String username, String password, String tel, String email, String homepage, String website, Integer rankings1, Integer rankings2, Integer credit, String intro, Integer status, LocalDateTime createTime, LocalDateTime updateTime) {
        this.avatar = avatar;
        this.nickname = nickname;
        this.username = username;
        this.password = password;
        this.tel = tel;
        this.email = email;
        this.homepage = homepage;
        this.website = website;
        this.rankings1 = rankings1;
        this.rankings2 = rankings2;
        this.credit = credit;
        this.intro = intro;
        this.status = status;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }
}
